<?php
/**
 * SocialEngine
 *
 * @category   Application_Extensions
 * @package    Inviter
 * @copyright  Copyright Hire-Experts LLC
 * @license    http://www.hire-experts.com
 * @version    $Id: Friendrequest.php 2010-07-02 19:54 mirlan $
 * @author     Mirlan
 */

/**
 * @category   Application_Extensions
 * @package    Inviter
 * @copyright  Copyright Hire-Experts LLC
 * @license    http://www.hire-experts.com
 */

class Inviter_Form_Friendrequest extends Engine_Form {
	protected $user_ids;
	
	public function setParams($params) {
		$this->user_ids = $params ['user_ids'];
	}
	
	public function init() {
		$this->setTitle ( 'Add Friends' )->setDescription ( 'INVITER_FORM_FRIENDREQUEST_DESCRIPTION' )->setAttrib ( 'class', 'global_form_popup' )->setAction ( $_SERVER ['REQUEST_URI'] );
		
		$this->addElement ( 'Hidden', 'user_ids', array ('value' => implode ( ',', $this->user_ids ) ) );
		
		$this->addElement ( 'Button', 'submit', array ('label' => 'Add Friend', 'type' => 'submit', 'ignore' => true, 'decorators' => array ('ViewHelper' ) ) );
		
		$this->addElement ( 'Cancel', 'cancel', array ('label' => 'cancel', 'link' => true, 'prependText' => ' or ', 'href' => '', 'onclick' => 'parent.Smoothbox.close();', 'decorators' => array ('ViewHelper' ) ) );
		$this->addDisplayGroup ( array ('submit', 'cancel' ), 'buttons' );
		$button_group = $this->getDisplayGroup ( 'buttons' );
	}
}
